
 
 F u n c t i o n :   t o F e t c h ( S t r i n g U R L ) 
 
 
 
 D e s c r i p t i o n :   C o n v e r t s   a   s t r i n g   U R L   p l u s   I D   r e f e r e n c e   i n t o   a   v a l i d   F e t c h   A P I   d a t a   o b j e c t . 
 
 
 
 R e t u r n s :   O b j e c t . 
 
 
 
 N o t e :   T h e   t o F e t c h ( )   f u n c t i o n   o n l y   r e t u r n s   t h e   c o n v e r t e d   o b j e c t ,   w h i c h   i s   m e a n t   t o   t h e n   b e   p a s s e d   i n t o   a   D C   o b j e c t   d e c l a r a t i o n . 
 
 
 
 E x a m p l e : 
 
 
 
 / /   C o n v e r t   a   s t r i n g   U R L   i n t o   a   F e t c h   d a t a   o b j e c t . 
 
 
 
 v a r   m y F e t c h   =   $ A . t o F e t c h ( " p a t h / f i l e . h t m # u n i q u e I d O f C o n t e n t T o F e t c h " ) ; 
 
 
 
 / /   R e t u r n s   t h e   f o l l o w i n g   d a t a   o b j e c t : 
 
 
 
 { 
 
     u r l :   " p a t h / f i l e . h t m " , 
 
     d a t a :   { 
 
         s e l e c t o r :   " # u n i q u e I d O f C o n t e n t T o F e t c h " 
 
     } 
 
 } 
 
 
 
 / /   W h i c h   c a n   t h e n   b e   u s e d   t o   d y n a m i c a l l y   p u l l   t h e   r e f e r e n c e d   e x t e r n a l   c o n t e n t   i n t o   a   D C   o b j e c t . 
 
 
 
 v a r   D C   =   $ A . t o D C ( { 
 
     f e t c h :   m y F e t c h , 
 
     r o o t :   " # i d O f C o n t a i n e r T o I n s e r t I m p o r t e d C o n t e n t W i t h i n " 
 
 } ) ; 
 
 
 
 D C . r e n d e r ( ) ; 
 
 